package com.baitiaojun.video.mapper;

import com.baitiaojun.api.domain.video.VideoCollection;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface VideoCollectionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(VideoCollection record);

    int insertSelective(VideoCollection record);

    VideoCollection selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(VideoCollection record);

    int updateByPrimaryKey(VideoCollection record);

    int deleteCollection(@Param("videoId") Long videoId, @Param("userId") Long userId);

    int selectVideoCollectionCount(Long videoId);

    Integer isCollected(@Param("videoId") Long videoId, @Param("userId") Long userId);

    List<VideoCollection> selectVideoCollectionByUserId(@Param("userId") Long userId);

    int deleteVideoCollectionByGroupId(Long groupId);

    Integer isExistsVideoCollections(Long groupId);

    Long selectUserIdByVideoId(Long videoId);
}